//package Study;

import java.util.Scanner;
class Value{
    private int i;
    public void set(int i){
        this.i = i;
    }
    public int get(){
        return i;
    }
}
public class practics {

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        Value []a = new Value[10];
//        Value b =new Value();
        for(int i = 0;i<a.length;i++){
            a[i] = new Value();
            a[i].set(i);
        }
        for(Value v :a){
            System.out.println(v.get());
            v.set(0);
        }
        for(Value v :a){
            System.out.println(v.get());
        }
    }
}